"responseBody": {
"content": [{
"paymentMethod": "ACCOUNT_TRANSFER",
"createdOn": "2019-10-29T11:02:00.000+0000",
"amount": 22.00,
"flagged": false,
"currencyCode": "NGN",
"completedOn": "2019-10-29T11:08:11.000+0000",
"paymentDescription": "Isoken 001",
"paymentStatus": "EXPIRED",
"transactionReference": "MNFY|20191029110159|005805",
"paymentReference": "MNFY|20191029110159|005805",
"merchantCode": "ZETBBQ5Q7VLB",
"merchantName": "Lahray LTD "
},
{
"paymentMethod": "ACCOUNT_TRANSFER",
"createdOn": "2019-10-29T10:45:12.000+0000",
"amount": 22.00,
"flagged": false,
"fee": 0.18,
"currencyCode": "NGN",
"completedOn": "2019-10-29T10:49:49.000+0000",
"paymentDescription": "Isoken 001",
"paymentStatus": "PAID",
"transactionReference": "MNFY|20191029104511|005830",
"paymentReference": "MNFY|20191029104511|005830",
"merchantCode": "ZETBBQ5Q7VLB",
"merchantName": "Lahray LTD ",
"payableAmount": 22.00
}
],
"last": false,
"totalElements": 258,
"totalPages": 129,
"first": true,
"numberOfElements": 2,
"size": 2,
"number": 0,
"empty": false
}
Hello you try to do Object Iteration, check the official documentation's link in PHP for more.
Clear Point: let me explain it simply as who I'm see the thing, your output is an object output.. let suppose that object is named "transactionReferences"
You can looping thought this object. Foreach loop would work fine with you in this case.
How it works:
foreach ($transactionReferences as $value) {
echo $obj->property;
}
More approach using to access your object properties
foreach ($transactionReferences as $value){
echo $value->content;
}
Hope this explanation helps